#!/bin/bash

echo "=== Quick Server Status Check ==="

# Check if routes directory exists and list files
echo "Checking routes directory..."
ssh -o ConnectTimeout=10 root@47.237.10.129 'ls -la /opt/cumrbull/backend/src/routes/' 2>/dev/null || echo "SSH connection failed"

# Check backend service status
echo "Checking backend service..."
ssh -o ConnectTimeout=10 root@47.237.10.129 'ps aux | grep "node src/app.js" | grep -v grep' 2>/dev/null || echo "Backend service check failed"

# Check port 3000
echo "Checking port 3000..."
ssh -o ConnectTimeout=10 root@47.237.10.129 'netstat -tlnp | grep :3000' 2>/dev/null || echo "Port 3000 check failed"

echo "=== Check completed ==="